package com.dyzx.hbb.modules.fcxs.entity;

import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;

/**
 * 房源表实体类
 * 
 * 功能说明：表示房源基本信息的数据模型，映射数据库表fcxs_house
 * 主要字段描述：
 * - 基本信息：房源ID、分类、类型、房源号
 * - 位置信息：楼栋号、单元号、楼层、房号
 * - 面积信息：套内面积、公摊面积、建筑面积
 * - 价格信息：指导单价、指导总价
 * - 状态信息：状态、创建日期、更新日期等
 * 
 * @author 开发团队
 * @version 1.0.0
 * @since 2025-05-20
 */
@TableName(value ="fcxs_house")
@Data
public class FcxsHouse {
    /**
     * 编号
     */
    @TableId(type = IdType.AUTO)
    private Long id;
    /**
     * 分类 字典信息：fcxs_house_category
     */
    private Integer category;
    /**
     * 房源号 自动生成   房源号格式=类型/楼栋号-单元-楼层-房号
     */
    private String houseNo;

    /**
     * 类型 字典信息：fcxs_house_type
     */
    private Integer type;

    /**
     * 楼栋号
     */
    private Integer buildingNum;

    /**
     * 单元号
     */
    private Integer unit;

    /**
     * 楼层
     */
    private Integer floor;

    /**
     * 房号
     */
    private Integer roomNum;

    /**
     * 套内面积
     */
    private Integer innerArea;

    /**
     * 公摊面积
     */
    private Integer publicArea;

    /**
     * 建筑面积 建筑面积=套内面积+公摊面积
     */
    private Integer area;

    /**
     * 指导单价
     */
    private Long price;

    /**
     * 指导总价  指导总价=建筑面积 * 指导单价
     */
    private Long totalPrice;

    /**
     * 状态 字典信息：sys_global_status
     */
    private Integer status;
    /**
     * 创建日期（毫秒级时间戳）
     */
    @TableField(fill = FieldFill.INSERT)
    private Long createDate;

    /**
     * 更新日期（毫秒级时间戳）
     */
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Long updateDate;

    /**
     * 删除标志
     */
    private Integer deleted;

    /**
     * 操作用户编号
     */
    private Long operatorId;

    /**
     * 企业编号
     */
    private Long organId;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        FcxsHouse other = (FcxsHouse) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getHouseNo() == null ? other.getHouseNo() == null : this.getHouseNo().equals(other.getHouseNo()))
            && (this.getType() == null ? other.getType() == null : this.getType().equals(other.getType()))
            && (this.getBuildingNum() == null ? other.getBuildingNum() == null : this.getBuildingNum().equals(other.getBuildingNum()))
            && (this.getUnit() == null ? other.getUnit() == null : this.getUnit().equals(other.getUnit()))
            && (this.getFloor() == null ? other.getFloor() == null : this.getFloor().equals(other.getFloor()))
            && (this.getRoomNum() == null ? other.getRoomNum() == null : this.getRoomNum().equals(other.getRoomNum()))
            && (this.getInnerArea() == null ? other.getInnerArea() == null : this.getInnerArea().equals(other.getInnerArea()))
            && (this.getPublicArea() == null ? other.getPublicArea() == null : this.getPublicArea().equals(other.getPublicArea()))
            && (this.getArea() == null ? other.getArea() == null : this.getArea().equals(other.getArea()))
            && (this.getPrice() == null ? other.getPrice() == null : this.getPrice().equals(other.getPrice()))
            && (this.getTotalPrice() == null ? other.getTotalPrice() == null : this.getTotalPrice().equals(other.getTotalPrice()))
            && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus()))
            && (this.getCreateDate() == null ? other.getCreateDate() == null : this.getCreateDate().equals(other.getCreateDate()))
            && (this.getUpdateDate() == null ? other.getUpdateDate() == null : this.getUpdateDate().equals(other.getUpdateDate()))
            && (this.getDeleted() == null ? other.getDeleted() == null : this.getDeleted().equals(other.getDeleted()))
            && (this.getOperatorId() == null ? other.getOperatorId() == null : this.getOperatorId().equals(other.getOperatorId()))
            && (this.getOrganId() == null ? other.getOrganId() == null : this.getOrganId().equals(other.getOrganId()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getHouseNo() == null) ? 0 : getHouseNo().hashCode());
        result = prime * result + ((getType() == null) ? 0 : getType().hashCode());
        result = prime * result + ((getBuildingNum() == null) ? 0 : getBuildingNum().hashCode());
        result = prime * result + ((getUnit() == null) ? 0 : getUnit().hashCode());
        result = prime * result + ((getFloor() == null) ? 0 : getFloor().hashCode());
        result = prime * result + ((getRoomNum() == null) ? 0 : getRoomNum().hashCode());
        result = prime * result + ((getInnerArea() == null) ? 0 : getInnerArea().hashCode());
        result = prime * result + ((getPublicArea() == null) ? 0 : getPublicArea().hashCode());
        result = prime * result + ((getArea() == null) ? 0 : getArea().hashCode());
        result = prime * result + ((getPrice() == null) ? 0 : getPrice().hashCode());
        result = prime * result + ((getTotalPrice() == null) ? 0 : getTotalPrice().hashCode());
        result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode());
        result = prime * result + ((getCreateDate() == null) ? 0 : getCreateDate().hashCode());
        result = prime * result + ((getUpdateDate() == null) ? 0 : getUpdateDate().hashCode());
        result = prime * result + ((getDeleted() == null) ? 0 : getDeleted().hashCode());
        result = prime * result + ((getOperatorId() == null) ? 0 : getOperatorId().hashCode());
        result = prime * result + ((getOrganId() == null) ? 0 : getOrganId().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", houseNo=").append(houseNo);
        sb.append(", type=").append(type);
        sb.append(", buildingNum=").append(buildingNum);
        sb.append(", unit=").append(unit);
        sb.append(", floor=").append(floor);
        sb.append(", roomNum=").append(roomNum);
        sb.append(", innerArea=").append(innerArea);
        sb.append(", publicArea=").append(publicArea);
        sb.append(", area=").append(area);
        sb.append(", price=").append(price);
        sb.append(", totalPrice=").append(totalPrice);
        sb.append(", status=").append(status);
        sb.append(", createDate=").append(createDate);
        sb.append(", updateDate=").append(updateDate);
        sb.append(", deleted=").append(deleted);
        sb.append(", operatorId=").append(operatorId);
        sb.append(", organId=").append(organId);
        sb.append("]");
        return sb.toString();
    }
}